Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not allow jj init --git in existing Git repo #2641

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

chriskrycho
Copy link
Contributor

@chriskrycho chriskrycho commented Nov 26, 2023

Allowing jj init --git in an existing Git repo creates a second Git store in .jj/repo/store/git, totally disconnected from the existing Git store. This will only produce extremely confusing bugs for users, since any operations they make in Git will not be reflected in the jj repo.

Note: this is a tweak to the behavior as originally implemented in #687.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • N/A: I have updated the documentation (README.md, docs/, demos/)
  • N/A: I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@chriskrycho chriskrycho force-pushed the push-xvnszvpvwvnp branch 2 times, most recently from 297909c to 6a41bfb Compare November 26, 2023 23:46
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thanks.

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@thoughtpolice thoughtpolice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Contributor

@PhilipMetzger PhilipMetzger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, thanks for the quick followup.

cli/src/commands/init.rs Outdated Show resolved Hide resolved
Allowing `jj init --git` in an existing Git repo creates a second Git
store in `.jj/repo/store/git`, totally disconnected from the existing
Git store. This will only produce extremely confusing bugs for users,
since any operations they make in Git will *not* be reflected in the
jj repo.
@thoughtpolice thoughtpolice merged commit b4caef7 into jj-vcs:main Nov 28, 2023
15 checks passed
@chriskrycho chriskrycho deleted the push-xvnszvpvwvnp branch November 28, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants